The present invention relates to an IrDA modulation/demodulation integrated circuit device that is used to perform infrared communication by a method complying with IrDA (Infrared Data Association), and particularly to an IrDA modulation/demodulation integrated circuit device that performs infrared communication by an IrDA-complying method that meets the SIR (serial infrared) standards.
A conventional IrDA modulation/demodulation integrated circuit device will be described with reference to FIGS. 8 and 9. FIG. 8 is a hierarchy diagram illustrating a communication control process performed in an IrDA-complying method. For example, consider a case where a signal that serially conveys data, such as an RS-232C signal, is transmitted by infrared rays. First, the signal that serially conveys data is received by a layer called IrCOMM 70. Next, a layer called TinyTP 71 performs flow control so that signal transmission will be suspended when, for example, the buffer capacity becomes insufficient. A layer called IrLMP (infrared link management protocol) 72 performs management of, for example, communication destinations when communicating with more than one communication destination.
A layer called IrLAP (infrared link access protocol) 73 produces a signal for transmission and transfers it to a layer called the physical layer 74. This signal is modulated by the physical layer 74 and is then, by the use of a light-emitting diode or the like, transmitted as radiation of infrared rays. Whereas IRCOMM 70, TinyTP 71, IrLMP 72, and IrLAP 73 are realized as software, the physical layer 74 is realized as hardware. On the other hand, when a signal is received from the outside as radiation of infrared rays, it is sensed by the use of a photodiode or the like, is then demodulated by the physical layer 74, and is then transferred to IrLAP 73. The signal is then processed by IrLAP 73, IrLMP 72, TinyTP 71, and IrCOMM 70 so that necessary data will be extracted from the signal.
The composition of a frame according to the SIR standards is shown in FIG. 9. An IrDA-complying method achieves half-duplex communication, using a frame 80 as a unit of data transfer. A frame 80 is composed of, from its head end, a BOF (beginning of frame) flag 81, an address (A) field 82, a control (C) field 83, an information (I) field 84, a frame check sequence (FCS) field 85, and an EOF (end of frame) flag 86.
The BOF flag 81 is a flag indicating the start of a frame, and its value is defined by (CO)16. Note that the figures placed after the closing parenthesis represents the base number. The next field, i.e. the A field 82, is an eight-bit field used to identify a communication partner. The next field, i.e. the C field 83, is an eight-bit field used to define the function of the frame 80.
The next field, i.e. the I field 84, is a field for data communicated. The length of the I field is equal to a multiple of eight bits, but the frame 80 may not include any I field 84. The next field, i.e. the FCS field 85, is a 16-bit field used to check for a transfer error by a CRC (cyclic redundancy check) method. The EOF flag is a flag indicating the end of the frame 80, and its value is defined by (C1)18.
According to the SIR standards, an IrDA modulation/demodulation integrated circuit device is supposed to create a frame 80 on a software basis when transmission is performed. Specifically, IrLAP 73 (see FIG. 8) performs calculation on the data of the A, C, and I fields 82 to 84 to calculate a frame check sequence by a 16-bit CRC-CCITT (described later) method, and then appends the result to the end of the data. Thereafter, IrLAP 73 performs data transparency control (described later) for transmission, adds the BOF flag 81 and the EOF flag 86 to the data, and then transfers the data to the physical layer 74. The physical layer 74 modulates the signal conveying the frame 80, and transmits it by infrared rays.
On the other hand, when reception is performed, the physical layer 74 demodulates the received signal, and then transfers it to IrLAP 73. IrLAP 73 recognizes the BOF flag, recognizes the following one byte as the A field, recognizes the following one byte as the C field, and then recognizes the start of the I field. When IrLAP 73 recognizes the EOF flag, it recognizes the two bytes immediately before the EOF flag as the FCS field, and recognizes the data following the C field and preceding the FCS field as the I field. Thereafter, IrLAP 73 performs data transparency control (described later) for reception, and, for example, checks for a transfer error by checking the value in the FCS field.
However, in this conventional IrDA modulation/demodulation integrated circuit device, calculation of the frame check sequence, data transparency control, and other operations are performed on a software basis, and thus require considerably high computing performance. This may not lead to a serious problem on a personal computer or the like incorporating a high-performance CPU, but, on a portable appliance or on a peripheral device for use with a personal computer, requires its CPU to operate near the limits of its performance, leaving no extra power for other operations, or even above the limits of its performance, making it impossible to perform desired operations properly.
An object of the present invention is to provide an IrDA modulation/demodulation integrated circuit device that performs less operations on a software basis.
To achieve the above object, according to a first configuration of the present invention, an IrDA modulation/demodulation integrated circuit device for modulating/demodulating a signal by an IrDA-complying method that meets SIR standards is provided with: a transmission-side CRC block for performing calculation on data consisting of an address field, a control field, and an information field to calculate a frame check sequence and then appending a frame check sequence field to the data; a transmission-side data transparency control block for performing data transparency control for transmission on the data output from the transmission-side CRC block; a transmission-side flag block for adding a BOF flag and an EOF flag at the head and the tail, respectively, of the data output from the transmission-side data transparency control block; a reception-side flag block for removing the BOF flag and the EOF flag from a demodulated signal; a reception-side data transparency control block for performing data transparency control for reception on the basis of data output from the reception-side flag block; and a reception-side CRC block for checking for a transfer error by checking the value in the frame check sequence field included in the data output from the reception-side data transparency control block.
According to this configuration, when data is transmitted, the IrDA modulation/demodulation integrated circuit device, by using the transmission-side CRC block, performs calculation on data consisting of A, C, and I fields to calculate a frame check sequence. It then performs data transparency control, and then adds a BOF flag and an EOF flag to create a frame. By modulating the signal conveying this frame, the IrDA modulation/demodulation integrated circuit device transmits it by infrared rays by using a light-emitting diode or the like.
On the other hand, when data is received, the IrDA modulation/demodulation integrated circuit device demodulates the signal sensed by a photodiode or the like, recognizes a frame in the signal, and eliminates therefrom the BOF and EOF flags. It then performs data transparency control for reception, and then, by using the reception-side CRC block, for example calculates the frame check sequence to check whether it coincides with the value in the FCS field appended to each frame, and thereby checks for a transfer error.
According to a second configuration of the present invention, the IrDA modulation/demodulation integrated circuit device of the first configuration described above is further provided with: a register for storing a signal for specifying the number of BOF flags added at the head of a frame. Here, in accordance with the signal from the register, the transmission-side flag block adds more than one BOF flag to the frame.
In an IrDA-complying method, additional BOFs (described later) are set by negotiation performed during communication. According to the second configuration described above, to specify the number of BOF flags, for example a parameter for specifying additional BOFs and a parameter for specifying a baud rate are stored in the above-mentioned register so that the transmission-side flag block will read information from the register and add some BOF flags if necessary when it creates a frame.